function max_num=MaxAscendingLength(S);
%MaxAscendingLength: get the size of the longest strictly increasing
%sequence of a list.
%max_num=MaxAscendingLength(S):S is a real number list, max_num is the the size of the longest strictly increasing
%sequence of S.
S=reshape(S,[],1);
S_size=size(S);
len=S_size(1);
C=ones(len,1);
for j=2:len
    for k=1:j-1
        if S(k)<S(j)
            C(j)=max([C(j),C(k)+1]);
        end
    end
end

max_num = max(C);
end